var config = {
    "load_1min": {
        "id": "load_1min",
        "title": "load_1min",
        "y_title": "Loads",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 3,
            "rate": false
        },
        "series": {
            "1min": {"metric": "proc.loadavg.1min", "tags": {}}
        }
    },
    "req_count": {
        "id": "req_count",
        "title": "Requests Count",
        "y_title": "Ops",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": true
        },
        "series": {
            "read": {"metric": "hbase.regionserver.readRequestsCount", "tags": {}},
            "write": {"metric": "hbase.regionserver.writeRequestsCount", "tags": {}}
        }
    },
    "cpu": {
        "id": "cpu",
        "title": "Cpu Percent",
        "y_title": "Percent",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 3,
            "rate": true
        },
        "series": {
            "user": {"metric": "proc.stat.cpu.percpu", "tags": {"type": "user"}},
            "nice": {"metric": "proc.stat.cpu.percpu", "tags": {"type": "nice"}},
            "system": {"metric": "proc.stat.cpu.percpu", "tags": {"type": "system"}},
            "idle": {"metric": "proc.stat.cpu.percpu", "tags": {"type": "idle"}}
        }
    },
    "iostat": {
        "id": "iostat",
        "title": "Iostat",
        "y_title": "Ops",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": true
        },
        "series": {
            "read": {"metric": "iostat.disk.read_requests", "tags": {}},
            "write": {"metric": "iostat.disk.write_requests", "tags": {}}
        }
    },
    "network": {
        "id": "network",
        "title": "Network",
        "y_title": "Bytes",
        "aggregator": {
            "downsample_delta": '1m',
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": true
        },
        "series": {
            "in": {"metric": "proc.net.bytes", "tags": {"direction": "in"}},
            "out": {"metric": "proc.net.bytes", "tags": {"direction": "out"}}
        }
    },
    "gc_count": {
        "id": "gc_count",
        "title": "gc_count",
        "y_title": "Ops",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": true
        },
        "series": {
            "gc_count": {"metric": "jvm.metrics.gcCount", "tags": {}}
        }
    },
    "gc_time": {
        "id": "gc_time",
        "title": "gc_time",
        "y_title": "ms",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": true
        },
        "series": {
            "gc_time": {"metric": "jvm.metrics.gcTimeMillis", "tags": {}}
        }
    },
    "threads_stat": {
        "id": "threads_stat",
        "title": "threads_stat",
        "y_title": "Num",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "blocked": {"metric": "jvm.metrics.threadsBlocked", "tags": {}},
            //            "new": {"metric": "jvm.metrics.threadsNew", "tags": {}},
            //            "waiting": {"metric": "jvm.metrics.threadsWaiting", "tags": {}},
            //            "t_waiting": {"metric": "jvm.metrics.threadsTimedWaiting", "tags": {}},
            "runnable": {"metric": "jvm.metrics.threadsRunnable", "tags": {}}
            //            "terminated": {"metric": "jvm.metrics.threadsTerminated", "tags": {}}
        }
    },
    "memory": {
        "id": "memory",
        "title": "memory",
        "y_title": "MB",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "max": {"metric": "jvm.metrics.maxMemoryM", "tags": {}},
            "committed": {"metric": "jvm.metrics.memHeapCommittedM", "tags": {}},
            "used": {"metric": "jvm.metrics.memHeapUsedM", "tags": {}}
            //            "non_heap_committed": {"metric": "jvm.metrics.memNonHeapCommittedM", "tags": {}},
            //            "non_heap_used": {"metric": "jvm.metrics.memNonHeapUsedM", "tags": {}}
        }
    },
    "flush_compact_queue": {
        "id": "flush_compact_queue",
        "title": "flush_compact_queue_length",
        "y_title": "Length",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "flush": {"metric": "hbase.regionserver.flushQueueSize", "tags": {}},
            "compaction": {"metric": "hbase.regionserver.compactionQueueSize", "tags": {}}
        }
    },
    "flush_compact_size_avg_time": {
        "id": "flush_compact_size_avg_time",
        "title": "flush_compact_size_avg_time",
        "y_title": "ms",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "flush": {"metric": "hbase.regionserver.flushSize_avg_time", "tags": {}},
            "compaction": {"metric": "hbase.regionserver.compactionSize_avg_time", "tags": {}}
        }
    },
    "flush_compact_time_avg_time": {
        "id": "flush_compact_time_avg_time",
        "title": "flush_compact_time_avg_time",
        "y_title": "ms",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "flush": {"metric": "hbase.regionserver.flushTime_avg_time", "tags": {}},
            "compaction": {"metric": "hbase.regionserver.compactionTime_avg_time", "tags": {}}
        }
    },
    "flush_compact_num_ops": {
        "id": "flush_compact_num_ops",
        "title": "flush_compact_num_ops",
        "y_title": "Ops",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "flush": {"metric": "hbase.regionserver.flushSize_num_ops", "tags": {}},
            "compaction": {"metric": "hbase.regionserver.compactionSize_num_ops", "tags": {}}
        }
    },
    "split_count": {
        "id": "split_count",
        "title": "split_count",
        "y_title": "Ops",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "success": {"metric": "hbase.regionserver.regionSplitSuccessCount", "tags": {}},
            "failure": {"metric": "hbase.regionserver.regionSplitFailureCount", "tags": {}}
        }
    },
    "memstore_size": {
        "id": "memstore_size",
        "title": "memstore_size",
        "y_title": "MB",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "memstore": {"metric": "hbase.regionserver.memstoreSizeMB", "tags": {}}
        }
    },
    "cache_hit_ratio": {
        "id": "cache_hit_ratio",
        "title": "cache_hit_ratio",
        "y_title": "Percent",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "cache": {"metric": "hbase.regionserver.blockCacheHitRatio", "tags": {}},
            "caching": {"metric": "hbase.regionserver.blockCacheHitCachingRatio", "tags": {}}
        }
    },
    "cache_hit_ratio_past_n_periods": {
        "id": "cache_hit_ratio_past_n_periods",
        "title": "cache_hit_ratio_past_n_periods",
        "y_title": "Percent",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "cache": {"metric": "hbase.regionserver.blockCacheHitRatioPastNPeriods", "tags": {}},
            "caching": {"metric": "hbase.regionserver.blockCacheHitCachingRatioPastNPeriods", "tags": {}}
        }
    },
    "call_queue_length": {
        "id": "call_queue_length",
        "title": "call_queue_length",
        "y_title": "Length",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "flush": {"metric": "rpc.metrics.callQueueLen", "tags": {}}
        }
    },
    "rpc_time": {
        "id": "rpc_time",
        "title": "rpc_time",
        "y_title": "ms",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "processing": {"metric": "rpc.metrics.RpcProcessingTime_avg_time", "tags": {}},
            "queue": {"metric": "rpc.metrics.RpcQueueTime_avg_time", "tags": {}}
        }
    },
    "num_open_connections": {
        "id": "num_open_connections",
        "title": "num_open_connections",
        "y_title": "Num",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": false
        },
        "series": {
            "flush": {"metric": "rpc.metrics.NumOpenConnections", "tags": {}}
        }
    },
    "sent_received_bytes": {
        "id": "sent_received_bytes",
        "title": "sent_received_bytes",
        "y_title": "",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": true
        },
        "series": {
            "sent": {"metric": "rpc.metrics.SentBytes", "tags": {}},
            "received": {"metric": "rpc.metrics.ReceivedBytes", "tags": {}}
        }
    },
    "rpcNumOps": {
        "id": "rpc_num_ops",
        "title": "rpc_num_ops",
        "y_title": "ops",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": true
        },
        "series": {
            "get": {"metric": "rpc.metrics.get_num_ops", "tags": {}},
            "multi": {"metric": "rpc.metrics.multi_num_ops", "tags": {}},
            "openScanner": {"metric": "rpc.metrics.next_num_ops", "tags": {}},
            "next": {"metric": "rpc.metrics.openScanner_num_ops", "tags": {}},
            "delete": {"metric": "rpc.metrics.delete_num_ops", "tags": {}}
        }
    },
    "rpcAvgTime": {
        "id": "rpc_avg_time",
        "title": "rpc_avg_time",
        "y_title": "ms",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 3,
            "rate": false
        },
        "series": {
            "get": {"metric": "rpc.metrics.get_avg_time", "tags": {}},
            "multi": {"metric": "rpc.metrics.multi_avg_time", "tags": {}},
            "openScanner": {"metric": "rpc.metrics.next_avg_time", "tags": {}},
            "next": {"metric": "rpc.metrics.openScanner_avg_time", "tags": {}},
            "delete": {"metric": "rpc.metrics.delete_avg_time", "tags": {}}
        }
    },
    "numOps": {
        "id": "numOps",
        "title": "",
        "y_title": "Ops",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 0,
            "rate": true
        },
        "series": {
            "get": {"metric": "get__num_ops", "tags": {}},
            "multiput": {"metric": "multiput__num_ops", "tags": {}}
        }
    },
    "avgTime": {
        "id": "avgTime",
        "title": "",
        "y_title": "ms",
        "aggregator": {
            "downsample_agg": 3,
            "aggregator": 3,
            "rate": false
        },
        "series": {
            "get": {"metric": "get__avg_time", "tags": {}},
            "multiput": {"metric": "multiput__avg_time", "tags": {}}
        }
    }
};

var charts_group = {
    "dashboard": ["req_count", "load_1min", "rpcNumOps", "rpcAvgTime", "cpu", "network"],
    "sys_tab": ["load_1min", "cpu", "iostat", "network"],
    "jvm_tab": ["threads_stat", "memory", "gc_count", "gc_time"],
    "rs_tab": ["flush_compact_queue", "flush_compact_num_ops", "flush_compact_size_avg_time",
               "flush_compact_time_avg_time", "cache_hit_ratio", "cache_hit_ratio_past_n_periods",
               "split_count", "memstore_size"],
    "rpc_tab": [, "rpcNumOps", "rpcAvgTime", "call_queue_length", "num_open_connections", "rpc_time", "sent_received_bytes"],
    "table_tab": ["numOps", "avgTime"]
}

var table_config = {
    "object-hbase": ["META", "-ROOT-", "weibo_obj", "weibo_uuid_obj", "weibo_obj_uuid","weibo_obj_uuid_revert","weibo_uuid_obj_revert"],
    "object-aggregate-hbase": ["META", "-ROOT-", "wg_catalog", "wg_connections", "wg_connections_index",
                               "wg_object_permissions", "wg_objects", "wg_objects_index"],
    "short-link-music": ["META", "-ROOT-","user_type_song"],
    "weibodata-platform": ["META", "-ROOT-","activity_user"],
    "fun-picture": ["META", "-ROOT-"],
    "public-test": ["META", "-ROOT-","activity_user"],
    "realtime-analyze": ["META", "-ROOT-"],
    "object-aggregate-hbase-offline": ["META", "-ROOT-"]
}

var server_config = {
    "object-hbase": ["10.75.21.46", "10.75.21.47", "10.75.21.48", "10.75.21.49", "10.75.21.50",
                     "10.75.21.51", "10.75.21.52", "10.75.17.145", "10.75.17.146", "10.75.17.147"],
    "object-aggregate-hbase": ["10.77.112.114", "10.77.112.116", "10.77.112.118", "10.77.112.110",
                               "10.77.112.111", "10.77.112.113", "10.77.112.106", "10.77.112.107",
                               "10.77.112.108", "10.77.112.109", "10.77.112.112", "10.77.112.115",
                               "10.77.112.117", "10.77.112.119", "10.77.112.120", "10.77.112.122",
                               "10.77.112.124", "10.77.112.125", "10.77.112.144", "10.77.112.145",
                               "10.77.112.146", "10.77.112.147", "10.77.112.148", "10.77.112.149"],
    "short-link-music": ["10.75.18.37", "10.75.18.38", "10.75.18.39", "10.75.18.40"],
    "weibodata-platform": ["10.75.17.165", "10.75.17.230", "10.75.18.179", "10.75.18.23","10.75.18.25",
                           "10.75.18.26","10.75.18.27","10.75.18.28","10.75.18.29","10.75.18.30"
                           ,"10.75.18.31","10.75.18.32"],
    "fun-picture": ["10.75.17.65", "10.75.6.66", "10.75.6.67", "10.75.6.70","10.75.6.72","10.75.6.73"],
    "public-test": [" 10.77.16.52", "10.77.16.53", "10.77.16.54", "10.77.16.55","10.77.16.56",
                       "10.77.16.57","10.77.16.58","10.77.16.59"],
     "realtime-analyze": ["10.75.19.239", "10.75.19.240", "10.75.19.241", "10.75.19.242","10.75.19.243"],
     "object-aggregate-hbase-offline": ["10.77.112.127", "10.77.112.128", "10.77.112.96"]
}